#ifndef SCREEN_H
#define SCREEN_H

class Screen; //must declare the same public methods as other screen types (ie. WINDOW)
class Screen_console; //must declare the same public methods as other screen types (ie. WINDOW)
enum Console_type{SCR_, SCR_CONSOLE}; //type of a Console

#include "includes.h"

using namespace std;

//a screen prototype, to be reused; can be used as a null output/input
class Screen {
	public:
		enum Console_type type; //needed for correct deconstruction
		void blit(); //redraw all widgets and blit() the console
		Input* get_input(); //get input from the console
		Screen();
//		Screen(Python* python);//initialize the screen and its API
		~Screen();
};

class Screen_console: public Screen {
	private:
		Console* console;
		list <Widget*> widgets; //list of all widgets on the screen
		//temporary, will be something more intelligent
		int x, y, width, height;
		void draw_widget(Widget* widget); //draw a given widget (expects that widget is actually not of type Widget, but its child type, ie. Widget_unit)
	public:
		Widget* add_widget(Widget_unit widget_unit); //returns pointer to the new widget
		Widget* add_widget(Widget_building widget_building); //returns pointer to the new widget
		void delete_widget(Widget* widget); //calls widget's destructor (it's a bit unsystematic, yeah)
		Widget* get_widget(Unit* unit); //get widget by unit (if such a widget exists, else NULL)
		Widget* get_widget(Building* building); //the same for a building
		bool draw_msgbox(string text); //show a simple message box
		void blit(); //redraw all widgets and blit() the console
		Input* get_input(); //get input from the console
		Screen_console();
//		Screen_console(Python* python);
		~Screen_console();
};
#endif